package model

import (
	"github.com/balance_foods/global"
	"github.com/balance_foods/model/basefile"
	"github.com/balance_foods/model/foods"
	"github.com/balance_foods/model/user"
	"log"
)

func init() {
	err := global.Db.Migrator().AutoMigrate(&user.User{}, foods.Category{}, basefile.BaseFile{},
		foods.Stand{},
		foods.DailyFood{})
	if err != nil {
		log.Fatalf("Auto Migsrate error")
		return
	}
	log.Printf("migrate success")
}
